package cn.nawang.ebeim.client.version;

import java.io.Serializable;
import java.util.List;

import cn.nawang.ebeim.client.bean.DbVersionTreeBean;

public interface Node extends Serializable {
  public static final byte STATUS_NOOP = 0;
  public static final byte STATUS_NO_CHANGE = 1;
  public static final byte STATUS_CHANGE = 2;
  public static final byte STATUS_ADD = 3;
  public static final byte STATUS_DELETED = 4;
  public static final byte STATUS_BEFORE_DELETED = 5;
  public static final byte STATUS_FAILED = 6;

  public void visit();

  public String getName();
  
  public void addToList(String dsId,String version,List<DbVersionTreeBean> beans);

  public Node getParent();
  
  public void setNid(String id);
  
  public void setPid(String id);

  public void setParent(Node node);

  public void merge(Node node);
  
  public void mergeAll(Node node);
  
  public void setDeleteStatus(byte status);

  public byte getStatus();

  public void setStatus(byte status);

  public boolean filterChanges(List<Node> list);

  public boolean traverse(NodeOp op);

  public boolean filter(List<Node> list, Filter filter);
  
  public String getPath();
}
